# encoding:utf-8
from __future__ import absolute_import
import sys, uuid
sys.path.append('..')


class SyswinError(Exception):
    '''
    classdocs
    '''


class SyswinNetworkError(SyswinError):
    """
    Raises in case of network error.
    """

    def __init__(self, *args, **kwargs):
        if len(args) > 1:
            self.original_exc = args[1]
        else:
            self.original_exc = None
        super(SyswinNetworkError, self).__init__(*args, **kwargs)

class SyswinTimeoutError(SyswinNetworkError):
    """连接超时"""


class SyswinFatalError(SyswinError):
    '''致命错误'''


class SyswinConnectionError(SyswinNetworkError):
    """连接错误"""


class SyswinCouldNotResolveHostError(SyswinNetworkError):
    """无法解析主机 """


class SyswinAuthError(SyswinError):
    """认证失败错误 """


class SyswinMisuseError(SyswinError):
    """使用不当 """


class SyswinTooManyRedirectsError(SyswinError):
    """多次跳转 """


class SyswinInvalidUrl(SyswinError):
    """无效Url"""


class  SyswinInputEmptyError(SyswinError):
    """
            输入为空字符串
    """


class SyswinInternalError(SyswinError):
    '''网络连接错误'''
